const express=require("express")

//导入cors模块解决跨域问题
const cors=require("cors")

//导入路由模块
const router=require("./2.apiRouter")

const app=express()

//注册cors模块
app.use(cors())

//注册json解析模块
app.use(express.json())

//注册路由模块
app.use(router)


app.listen(80,()=>{
    console.log("runing at server 127.0.0.1")
})